package academic.emailClient.model.entities;

import java.util.ArrayList;

/**
 * Implements the constructor that returns a filter objects with it's attributes more readable
 */
public class FilterBuilder {
	private String name;
	private ArrayList<String> query;
	private String destinationFolderPath;
	
	/**
	 * FilterBuilder Constructor
	 * @param name
	 * @return
	 */
	public FilterBuilder withName(String name) {
		this.name = name;
		return this;
	}
	
	/**
	 * with Query builder
	 * @param query
	 * @return
	 */
	public FilterBuilder withQuery(ArrayList<String> query) {
		this.query = query;
		return this;
	}
	
	/**
	 * with Destination Folder Path builder
	 * @param destinationFolderPath
	 * @return
	 */
	public FilterBuilder withDestinationFolderPath(String destinationFolderPath) {
		this.destinationFolderPath = destinationFolderPath;
		return this;
	}
	
	/**
	 * Build the filter object
	 * @return
	 */
	public Filter build(){
		return new Filter(name, query, destinationFolderPath);
	}
	
}
